package com.autologistics.model;

/**
 * MediamachineId entity. @author MyEclipse Persistence Tools
 */

public class MediamachineId implements java.io.Serializable {

	// Fields

	private Media media;
	private Machine machine;
	private Boolean isDelete;

	// Constructors

	/** default constructor */
	public MediamachineId() {
	}

	/** full constructor */
	public MediamachineId(Media media, Machine machine, Boolean isDelete) {
		this.media = media;
		this.machine = machine;
		this.isDelete = isDelete;
	}

	// Property accessors

	public Media getMedia() {
		return this.media;
	}

	public void setMedia(Media media) {
		this.media = media;
	}

	public Machine getMachine() {
		return this.machine;
	}

	public void setMachine(Machine machine) {
		this.machine = machine;
	}

	public Boolean getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof MediamachineId))
			return false;
		MediamachineId castOther = (MediamachineId) other;

		return ((this.getMedia() == castOther.getMedia()) || (this.getMedia() != null
				&& castOther.getMedia() != null && this.getMedia().equals(
				castOther.getMedia())))
				&& ((this.getMachine() == castOther.getMachine()) || (this
						.getMachine() != null && castOther.getMachine() != null && this
						.getMachine().equals(castOther.getMachine())))
				&& ((this.getIsDelete() == castOther.getIsDelete()) || (this
						.getIsDelete() != null
						&& castOther.getIsDelete() != null && this
						.getIsDelete().equals(castOther.getIsDelete())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getMedia() == null ? 0 : this.getMedia().hashCode());
		result = 37 * result
				+ (getMachine() == null ? 0 : this.getMachine().hashCode());
		result = 37 * result
				+ (getIsDelete() == null ? 0 : this.getIsDelete().hashCode());
		return result;
	}

}